Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update write function #174

Merged
merged 5 commits into from
Sep 21, 2024
Merged

Update write function #174

merged 5 commits into from
Sep 21, 2024

Conversation

Jougan-0
Copy link
Contributor

@Jougan-0 Jougan-0 commented Sep 16, 2024

Notes for Reviewers

This PR fixes #
meshery/meshkit#589
meshery/meshery#11354
These both needs to be merged also.

Signed commits

  • Yes, I signed my commits.

@Jougan-0 Jougan-0 added the pr/on hold PR/Issue on hold label Sep 17, 2024
@Jougan-0 Jougan-0 removed the pr/on hold PR/Issue on hold label Sep 19, 2024
relPath := filepath.Join(relDirPath, string(r.Kind), string(r.Type())+".json")
func (r RelationshipDefinition) WriteRelationshipDefinition(relDirPath string, fileType string) error {
relPath := filepath.Join(relDirPath, fmt.Sprintf("%s-%s.%s", r.Kind, utils.GetRandomAlphabetsOfDigit(3), fileType))
if fileType == "yaml" {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While I understand that you're not considering the file extension here and that this is identified elsewhere, I do wonder if that logic allow for both .yaml and .yml or if it even depends on the file extension at all.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will update in new PR.

@Jougan-0 Jougan-0 merged commit 9856034 into master Sep 21, 2024
2 checks passed
@Jougan-0 Jougan-0 deleted the updateWriteFunction branch September 21, 2024 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants